from typing import List


class Solution:
    def bubbleSort(self, nums: List):
        if len(nums) < 2:
            return nums
        j = len(nums) - 1
        while j > 0:
            for i in range(j):
                if nums[i] > nums[i+1]:
                    nums[i], nums[i+1] = nums[i+1], nums[i]
            j -= 1


if __name__ == '__main__':
    t = [3, 1, 5, -6, 7, 12, 2, 9, 10]
    x = Solution()
    x.bubbleSort(t)
    print(t)
